package cn.gorit.entity.content;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.redis.core.index.Indexed;

import java.io.Serializable;
import java.util.List;

/**
 * @version v1.0
 * @Classname Comment
 * @Description 评论实体类（采用 MangoDB 实现） 本地服务已经启动
 * @Author CodingGorit
 * @Created on 2021/4/2 22:56
 * @IDLE IntelliJ IDEA
 **/
@Document(value = "comment")
public class Comment implements Serializable {

    @Indexed
    @Id
    @Field("_id")
    private String id;

    private String comment_id;

    private String comment_blog_id;

    private String comment_user_id;

    private String comment_user_nickname;

    private String comment_user_avatar;

    private String comment_content;

    private String create_time;



    // 回复
    private List<CommentResponse> response;

    public String getComment_blog_id() {
        return comment_blog_id;
    }

    public void setComment_blog_id(String comment_blog_id) {
        this.comment_blog_id = comment_blog_id;
    }

    public String getComment_user_id() {
        return comment_user_id;
    }

    public void setComment_user_id(String comment_user_id) {
        this.comment_user_id = comment_user_id;
    }

    public String getComment_user_nickname() {
        return comment_user_nickname;
    }

    public void setComment_user_nickname(String comment_user_nickname) {
        this.comment_user_nickname = comment_user_nickname;
    }

    public String getComment_user_avatar() {
        return comment_user_avatar;
    }

    public void setComment_user_avatar(String comment_user_avatar) {
        this.comment_user_avatar = comment_user_avatar;
    }

    public String getComment_content() {
        return comment_content;
    }

    public void setComment_content(String comment_content) {
        this.comment_content = comment_content;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public List<CommentResponse> getResponse() {
        return response;
    }

    public void setResponse(List<CommentResponse> response) {
        this.response = response;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getComment_id() {
        return comment_id;
    }

    public void setComment_id(String comment_id) {
        this.comment_id = comment_id;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id='" + id + '\'' +
                ", comment_id='" + comment_id + '\'' +
                ", comment_blog_id='" + comment_blog_id + '\'' +
                ", comment_user_id='" + comment_user_id + '\'' +
                ", comment_user_nickname='" + comment_user_nickname + '\'' +
                ", comment_user_avatar='" + comment_user_avatar + '\'' +
                ", comment_content='" + comment_content + '\'' +
                ", create_time='" + create_time + '\'' +
                ", response=" + response +
                '}';
    }
}
